﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RegisterationCommon.Student;
using RegisterationCommon.Common;

namespace RegisterationSystem.Space_Student
{
    public partial class messageshow : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Bind();
            }
        }

        //绑定页面信息
        void Bind()
        {
            lblic.Text = Request["idc"];
            lblpwd.Text = Request["pwd"];
            //是否足龄
            if (Convert.ToBoolean(Request["ism"]))
            {
                lblism.Text = "足龄";
                lblmess.Text = "为方便工作开展,请确认您所输入的信息真实有效。";
                //是否是区外学生
                if (Convert.ToBoolean(Request["isqu"]))
                {
                    //lblmess.Text = "依据就近入学原则请到户口所在地就读。";
                    lblmess.Text = "依据新生入学坚持以区为主的原则请到户口所在地就读。";
                    this.ImageButton1.Visible = false;
                    this.Panel1.Visible = false;
                }
            }
            else
            {
                //不足龄
                lblism.Text = "不足龄";
                lblmess.Text = "依据中华人民共和国《义务教育法》规定,您的孩子未达到入学年龄。";
                this.ImageButton1.Visible = false;
                this.Panel1.Visible = false;
            }
          //  lbltime.Text = "请于" + Config.Current.Openingtime.ToString("yyyy-MM-dd") + "时间前关注审核结果。";
        }
        //登录
        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
                //判断密码是否正确
                if (StudentInfo.Current.ToLogin(this.lblic.Text.ToLower(), BaseLibrary.ConvertToMD5(this.lblpwd.Text.ToLower())))
                {
                    Message.Send(10003);
                }
        }
    }
}